﻿#region License

// Another free, open solution by someone who gets it.
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#endregion

using System;
using System.ComponentModel;

namespace Patterns.Fluency
{
	/// <summary>
	/// 	Hides System.Object methods to ease the use of fluent contracts.
	/// 	credit goes to: http://www.clariusconsulting.net/blogs/kzu/archive/2008/03/10/58301.aspx
	/// </summary>
	/// <remarks>
	/// 	Code that consumes implementations of this interface should expect one of two things:
	/// 	<list type = "number">
	/// 		<item>When referencing the component from within the same solution (project reference), you will still see the methods this interface is meant to hide.</item>
	/// 		<item>When referencing the component through the compiled output assembly (external reference), the standard Object methods will be hidden as intended.</item>
	/// 	</list>
	/// </remarks>
	[EditorBrowsable(EditorBrowsableState.Never)]
	public interface IFluentInterface
	{
		///<summary>
		///	Gets the instance type.
		///</summary>
		///<returns>The type of the instance.</returns>
		[EditorBrowsable(EditorBrowsableState.Never)]
		Type GetType();

		///<summary>
		///	Gets the instance hash code.
		///</summary>
		///<returns>The hash code.</returns>
		[EditorBrowsable(EditorBrowsableState.Never)]
		int GetHashCode();

		///<summary>
		///	Converts the instance to a string.
		///</summary>
		///<returns>The string value of the instance.</returns>
		[EditorBrowsable(EditorBrowsableState.Never)]
		string ToString();

		///<summary>
		///	Compares one instance to another.
		///</summary>
		///<param name = "other">The other instance.</param>
		///<returns>True if the instances are equal; otherwise, false.</returns>
		[EditorBrowsable(EditorBrowsableState.Never)]
		bool Equals(object other);
	}
}